﻿@model List<Lion.WeiXin.Core.Models.OrderModel>
@{
    Layout = "~/Views/Shared/_AppLayout.cshtml";
    List<Lion.WeiXin.Core.Models.OrderModel> list = Model as List<Lion.WeiXin.Core.Models.OrderModel>;
}
@section ChildPageJs {
    <script src="/Scripts/App_Scripts/WeiXinMyOrder.js" type="text/javascript"></script>
}
<form id="fmSave" class="am-form">
    <div data-role="fieldcontain">
        <ul id="olOrder" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="搜索订单" data-inset="true">
            <li id="liHeader" data-theme="b" data-role="list-divider">
                <h3>我的订单</h3>
            </li>
            @if (list.Count == 0)
            { 
                <li><a href="#">
                    <h2>无记录</h2>
                </a></li>
            }
            else
            {
                foreach (Lion.WeiXin.Core.Models.OrderModel item in list)
                {
                <li onclick="btnDel_click(this)">
                    @*<a href="#">*@
                    <h3>订单:<span>@item.Code</span></h3>
                    <p>总计:￥<span style="color:red">@item.Total</span></p>
                    <p>购买日期：@item.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")</p>
                    <p>
                        状态：
                        @{if (item.Status == 0)
                          { <span id="Status">@item.StatusName</span>}
                          else
                          {
                            <span id="Status" style="color: red">@item.StatusName</span>
                          }}
                    </p>
                    <input type="hidden" id="AID_@item.AID" name="AID" value="@item.AID"/>
                    @*  </a>*@
                    <!--订单详细-->
                    @foreach (Lion.WeiXin.Core.Models.Order_DetailsModel itemDetail in item.OrderItems)
                    {
                        <div class="ui-grid-b">
                            <div class="ui-block-a" style="height:80px;margin-bottom:6px" ><img src="@itemDetail.Image" style="width:100%;height:100%;border:1px solid #ccc" /></div>
                            <div class="ui-block-b" style="margin-left:6px">
                                <p style="font-weight:bold">@itemDetail.ProductName</p>
                                <p>￥:@itemDetail.BuyPrice</p>
                                <p>数量:@itemDetail.Quantity</p>
                            </div>
                        </div>
                    }
                </li> 
                }
            }
        </ul>
    </div>
</form>
